#!/bin/bash
# Date : 2018 05 27
# Author: ljwnet163@163.com

# 
# 创建几个文件：
>student_phone_1_passed.md
>student_phone_2_passed.md
>student_phone_3_passed.md
>student_phone_4_passed.md
# 
# 批量改后缀
# ls *.md
## {}实现 已完成
for i in cat `ls *.md`; do
	a=${i%_passed*}.md
	echo $i "->" $a
	mv $i $a
done
## sed 实现 - ????未完成
# for i in cat `ls *.md`; do
# 	a=${i%.md*}.txt
# 	echo $i "->" $a
# 	mv $i $a
# done
### awk实现 - ????未完成

#c版rename 实现
# rename .md .txt *.md
#perl版rename
# rename 's/.md/.txt/g' *.md

